home *** CD-ROM | disk | FTP | other *** search
Wrap
/*************************************/ /* Image Engineer Macro script */ /* by Simon Edwards */ /* 27/3/96 */ /* */ /* MS: external pictures now use */ /* zoomlevel of original picture */ /* */ /* Edge Effect v1.00 */ /*************************************/ Options results signal on error /* Setup a place for errors to go */ if arg()==0 then exit pic=arg(1) PROJECT_INFO pic WIDTH picwidth=result PROJECT_INFO pic HEIGHT picheight=result PROJECT_INFO pic ZOOM origzoomval=result 'REQUEST "Image to use for alpha channel" "Spherical|Spherical2|Gradient|Highlight|Highlight2"' reply=RESULT if reply==0 then alphaname='IE:alpha/Spherical.alpha' if reply==1 then alphaname='IE:alpha/Spherical2.alpha' if reply==2 then alphaname='IE:alpha/Gradient.alpha' if reply==3 then alphaname='IE:alpha/highlight.alpha' if reply==4 then alphaname='IE:alpha/highlight2.alpha' 'OPEN "'||alphaname||'" 8BIT' alphachannel=result PROJECT_SET alphachannel ZOOM origzoomval SCALE alphachannel picwidth picheight BEST newalpha=result CLOSE alphachannel 'GET_FILE "Choose Image to apply to edge" "Ok" "ram:"' edgeeffectname=RESULT 'OPEN "'||edgeeffectname||'" 8BIT' edgeimage=RESULT PROJECT_SET edgeimage ZOOM origzoomval RESIZE edgeimage picwidth picheight TILE newedgeimage=RESULT CLOSE edgeimage HISTOGRAM_EQUALIZATION newedgeimage edgeimage=RESULT CLOSE newedgeimage CONTRAST_STRETCH edgeimage newedgeimage=RESULT CLOSE edgeimage 'CONTRAST '||newedgeimage||' -1' edgeimage=RESULT CLOSE newedgeimage MARK edgeimage PRIMARY MARK newalpha ALPHA HALFTONE resultalpha=RESULT CLOSE newalpha CLOSE edgeimage NEGATIVE resultalpha newalpha=RESULT CLOSE resultalpha MARK newalpha ALPHA exit /*******************************************************************/ /* This is where control goes when an error code is returned by IE */ /* It puts up a message saying what happened and on which line */ /*******************************************************************/ error: if RC=5 then do /* Did the user just cancel us? */ IE_TO_FRONT LAST_ERROR 'REQUEST "'||RESULT||'"' exit end else do IE_TO_FRONT LAST_ERROR 'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!' exit end